package pl.krzosekm.vehicleregister.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="customer")
public class Customer extends PersistentObject {

    

    private static final long serialVersionUID = 790477793183248746L;

    @Id
    @Column(name="id", unique=true, nullable=false)
    private Long id;
    
    @Column(name="name", unique=true, nullable=false)
    private String name;
    
    @Column(name="surname", unique=true, nullable=true)
    private String surname;
    
    @Column(name="phone_number", unique=true, nullable=false)
    private String phoneNumber;
    
    
    public Customer(Long id, String name, String surname, String phoneNumber) {
		super();
		this.id = id;
		this.name = name;
		this.surname = surname;
		this.phoneNumber = phoneNumber;
	}
    

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
    
    
    
}
